//
//  ShellNetworkCalculateViewController.m
//  ShellWallert
//
//  Created by lvzhao on 2019/10/3.
//  Copyright © 2019 VV. All rights reserved.
//

#import "ShellNetworkCalculateViewController.h"
#import "ShellNetworkCalculateView.h"
#import "ShellNetworkCalculateViewModel.h"


@interface ShellNetworkCalculateViewController ()

@property (nonatomic,strong) ShellNetworkCalculateView *calculateView;

@property (nonatomic,strong) ShellNetworkCalculateViewModel *viewModel;

@end

@implementation ShellNetworkCalculateViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = LZLocalizedString(@"全网算力图");
    
    [self setupUI];
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    // 这里最好调用一下这个方法，防止界面跳转时，轮播图卡在一半。。。
    //    [self.homeView viewWillAppear];
}

#pragma mark - setupUI
- (void)setupUI{
    
    [self.view addSubview:self.calculateView];
    [self.calculateView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
}



#pragma mark - actions

#pragma mark - custool

#pragma mark - get && set
- (ShellNetworkCalculateView *)calculateView{
    
    if(!_calculateView){
        _calculateView = [[ShellNetworkCalculateView alloc] initViewModel:self.viewModel];
    }
    return _calculateView;
}

- (ShellNetworkCalculateViewModel *)viewModel{
    if(!_viewModel){
        _viewModel = [[ShellNetworkCalculateViewModel alloc] init];
        
    }
    return _viewModel;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
